package Parser;

import java.util.Hashtable;

public class GenTypeTable extends WezlangBaseListener{
	
	Hashtable<String, Term[]> structTable = new Hashtable<String, Term[]>();
	
	public void enterStruct_def(WezlangParser.Struct_defContext ctx) { 
		
		Term[] fields = new Term[ctx.typed_var().size()];
		for (int i = 0; i < fields.length; i++)
			fields[i] = new Term(ctx.typed_var(i).NAME().getText(), ctx.typed_var(i).type());
		structTable.put(ctx.TNAME().getText(), fields);
	}
	public void exitStruct_def(WezlangParser.Struct_defContext ctx) { 
		
	}
}
